import i18n from '@/i18n'
import { watch } from 'vue'
import store from '@/store'

export const getMenuTitle = (title) => {
  return i18n.global.t(`message.route.${title}`)
}
export const watchLangChange = (...cd) => {
  watch(
    () => store.getters.lang,
    () => {
      cd.forEach((cb) => cb(store.getters.lang))
    }
  )
}
